package com.deer.wms.base.system.service;

import com.deer.wms.base.system.model.Item.ItemType;
import com.deer.wms.base.system.model.Item.ItemTypeCriteria;
import com.deer.wms.base.system.model.Item.ItemTypeDto;
import com.deer.wms.project.root.service.SuperService;

import java.util.List;


/**
 *
 * @author guo
 * @since 2019/11/19
 */
public interface ItemTypeService extends SuperService<ItemType> {

    void deleteByCode(String itemTypeCode);

    List<ItemTypeDto> findList(ItemTypeCriteria criteria);

    List<ItemType> findByCode(String itemTypeCode);

    List<ItemType> findByName(String itemTypeName);

    List<ItemType> findByItemCode(String itemCode);

    List<ItemTypeDto> findParentList(ItemType itemType);

    List<Integer> treeParentList(List<ItemTypeDto> list, ItemType itemType);

    List<Integer> treeMenuList( List<ItemType> list, Integer parentId);

    /**
     * 删除物料种类及其子类
     * @param itemTypeId 物料种类ID
     */
    void deleteByIdAndLowLevel(Integer itemTypeId);

}
